package com.hryt.firstandroid;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

public class TmpActivity extends AppCompatActivity {

    private Button mBtnStartSelf;
    private Button mBtnStartSingleTask;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tmp);

        mBtnStartSelf = findViewById(R.id.btn_start_self);
        mBtnStartSelf.setOnClickListener(view -> {
            Intent intent = new Intent(TmpActivity.this, TmpActivity.class);
            startActivity(intent);
        });

        mBtnStartSingleTask = findViewById(R.id.btn_start_single_task);
        mBtnStartSingleTask.setOnClickListener(view -> {
            Intent intent = new Intent(TmpActivity.this, SingleTaskActivity.class);
            startActivity(intent);
        });
    }
}